Method and system for execution and latching of data in alternate threads

ABSTRACT

An alternate multi-thread pipeline structure and method are provided. A deep pipeline is provided in which two threads of two separate pipeline stages are alternatively presented to the various logic and latch circuits for execution. The execution and latching of the threads alternates from one thread to the other within a single clock cycle. Thus, each thread is executed once per clock cycle and two threads are executed in a single clock cycle.

BACKGROUND OF THE INVENTION

1. Field of the Invention

This invention relates to a pipe architecture in particular, toalternate multi-threaded pipeline architecture.

2. Description of the Related Art

The pipelining of instructions and data is well known in the processorart for one technique of achieving higher processing speed. In a typicalpipelined processor design, the data is passed through the processor invarious stages, referred to as a pipeline, in order to process largeamounts of data more quickly to obtain a final output at higher speeds.

The processor speed depends on the time to finish each task in everypipeline stage. In order to achieve higher speeds, the pipeline stagesare increased in number. For very high speeds, a deep pipeline having asmany as 9-12 stages may be used. Such a deep pipeline requiressubstantial refinement and precise timing between the circuits.

A deep pipeline design usually introduces pipeline stalls and branchpenalties. There is a requirement to use static and/or dynamic branchschemes in order to reduce the branch penalties. In addition,multi-threading is sometimes used reduce memory latenancies andVLIW/superscaler to improve ILP (instruction level parallel). The aboveattempts only solve a few of the problems introduced by using a deeppipeline and the improvement is not significant.

FIGS. 1 and 2A-2C illustrate current attempts at pipeline management. Asis known in the art, a pipeline may have many stages. In the embodimentsshown, 9 pipeline stages are illustrated, though the use of 6 pipelinesstages, or other lengths are well known in the art. The execution of thevarious pipeline stages of FIG. 1 is illustrated in FIG. 2A.

A pipeline 10 of data is illustrated in FIG. 1. A circuit capable of thepipeline of FIG. 1 includes 9 stages, the first stage being labeledstage 12 and the last being labeled 14. The steps 13 executed in eachstage are shown below the name for pipeline stage. One step 13 in thepipeline is executed on one clock cycle. The first step, InstructionFetch 1, (IF1) is executed on two parts of the clock cycle, C1 and C2.The steps 13 executed on these clock cycles are shown below the pipeline10, which include I Addr, Program Memory Read, etc.

The execution of the pipeline 10 is described with respect to FIG. 2A.An ALU is one form of a logic circuit 16 which executes the data fromthe pipeline stages 10. The ALU 16 has clocked inputs 18 and 20, whichreceive the data and transfer it for execution by the ALU 16 when theclock cycle is enabled.

In the embodiment of FIG. 2A, the clocks C1 and C2 represent oppositephases of the same clock driving the logic circuit 16. On a first clockC1 the data presented at inputs S0 and S1 is provided to the ALU 16 forexecution. The execution is completed and the data output of the ALU 16and presented at the input of multiplexer and drive circuit 22. On theopposite phase, the data is clocked out of the multiplexer 22 forpresentation 23. It is also fed back for presentation to the ALU 16 onthe subsequent clock cycle C1.

In the embodiment of the prior art in FIG. 2A, a single thread ofpipeline data is being processed. The time of a single clock cycle is2.5 nanoseconds, shown in FIG. 2A. The first part of the cycleintroduces the data to the ALU for execution, while the second part ofthe operates on the same thread and the same data to provide an outputto execute the data. The same pipeline thread 10 continues through theALU 16 for execution one stage at a time.

The operation of steps 13 can be seen in FIG. 1, after the first step ofIF1, a program memory read is executed which requires two clock cyclesfollowed by subsequent execution on each clock cycle, such asinstruction drive, IR latch and pre-decode ARF address, ARF read, etc.This particular approach makes use of a highly pipelined processor inorder to obtain an output stream.

Traditionally, a pipeline architecture is carried out as shown in FIG.2B in which each processor is physically separate from each other.Processor 25 and 27 are on a physically separate processor. Each of theprocessors operates in parallel using one or more state machines inorder to track the data.

There is a potential that the different instructions or data may causedelays in execution, and thus dedicated processors, each with its ownstate machine, are often used to avoid errors. This traditional dualprocessor system results in time delays and large use of surface area.Achieving fast clocks beats becomes more difficult. One prior arttechnique is described in an article in Microprocessor Report, Volume16, Archive 2, Feb. 2002, pages 4-9 titled “Technology 2001: On a ClearDay You Can See Forever,” by Max Barron, which illustrates animprovement in which the processor core remains the same and twoexecution logic circuits 15 are used which share processor coreresources. While this results in some improvement in operational time,it fails to provide a substantial advance across the entire systemlevel.

BRIEF SUMMARY OF THE INVENTION

According to principles of the present invention, an alternatemulti-thread pipeline structure and method are provided. A deep pipelineis provided in which two threads of two separate pipeline stages arealternatively presented to the various logic and latch circuits forexecution. The execution and latching of the threads alternates from onethread to the other within a single clock cycle. Thus, each thread isexecuted once per clock cycle and two threads are executed in a singleclock cycle.

An apparatus for carrying out the present invention includes a logiccircuit having a first input and a second input. First and secondclocked input circuits are provided having their respective outputscoupled to the input of the logic circuit. A signal line of a firstthread is coupled to both of the first and second input circuits. Asecond thread signal line of a second thread is also coupled to thefirst and second input circuits respectively. On a first clock event thesignal from the first thread for both the first and second input circuit20 is input to the logic circuit for execution. On a second event of thesame clock, clock the data present on the second thread is clocked bythe first and second input circuits into the logic circuit forexecution. Also on the second clock event, the executed data from thefirst thread that has been output by the logic circuit is latched by adriver circuit into an output node which also acts as a feedback node. Afeedback connection is provided from the output node to the first inputcircuit for feedback of the output. The timing is selected to ensurethat the feedback from the first thread is presented for executionsimultaneously with other steps from the same first thread. Execution ofdata from the second thread is timed to ensure that it does notinterfere with data from the first thread.

The two threads are executed simultaneously on the same hardware howeverthe clock events are timed to ensure that the two threads maintain thesame latency between pipeline stages as previously present in onethread. There is a switch from one thread to the other thread at eachclock event there being two clock events per cycle.

If there is a stall in one thread, the data is shifted into a shadowregister and the other thread continues to move through the pipeline.Thus, a stall in the execution does not affect or slow down one theunaffected thread.

Preferably the clock cycle is doubled in speed beyond that which isrequired for the data of a single thread to be processed. The two clocksoperate at double the frequency, with the rising edge of the first clockadvancing each thread data one stage further into the pipeline and therising edge of the second clock completing the execution of that stageof the pipeline so the thread is ready to advance to the next stage.Since the clock speed is doubled from what is needed to complete theexecution, a new data enters the pipeline at twice the prior rate. Thesecond clock provide sufficient time for the data to be executed in thestage of the pipeline. Thus, the time within each stage of the pipelineremains the same and a doubling of data through put is obtained with thesame hardware.

According to a alternative embodiment, one clock event in a single clockcycle is the rising edge of the clock pulse and the other clock event inthe clock cycle is the falling edge of the clock pulse. Accordingly, onethread is latched for execution on the rising edge of each clock pulseand it is also moves from stage to stage on the same rising edge throughan operation of the pipeline system. The other thread is latched andexecution is started on the falling edge of the same clock pulse.

The present invention provides an architecture that allows very highspeed processor design with an effective deep pipeline and highscalability. The, the pipeline can easily operate in the gigahertz plusrange without introducing new pipeline stalls or branch penalties.Further, complex circuit design is avoided. The alternate multi-threadarchitectures solves the branch and latency problems of the prior art bydoubling or otherwise multiplying the pipeline stages and switchingthreads in a pre-defined order. Another substantial advantage to thepresent invention is that the same software for executing the code canbe used. The same instruction set and register structure as presently inthe microprocessor may still be used. The substantial increase inperformances achieved with only slight increases in the powerconsumption and the use of a few additional logic and latch circuits.Two tasks are thus able to run simultaneously, achieving substantialbenefits.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 illustrates a block diagram of a pipeline according to the priorart.

FIG. 2A illustrates a structure for executing the pipeline at FIG. 1according to the prior art.

FIGS. 2B and 2C illustrate various processor organizations for threadedpipeline execution according to the prior art.

FIGS. 3A and 3B illustrate two threads being executed in an alternatethreaded pipeline according to principles of the present invention.

FIG. 4 illustrates a structure for carrying out the alternate threadedpipeline according to principles of the present invention.

FIG. 5 illustrates a timing diagram and a signal execution for variousnodes in the circuit of FIG. 4.

DETAILED DESCRIPTION OF THE INVENTION

As shown in FIG. 3B, Thread A 30, standing alone is organized as knownin the prior art, while Thread B 32, standing alone is also organized asknown in the prior art. The combining of the two creates in analternative threaded pipeline 34 within the present invention. FIG. 3Ashows how the two stages are timed of the different threads.

FIG. 3A illustrates two data stages being executed in an alternatemulti-thread pipeline according to principles of the present invention.The first data set, 40A is part of a first thread 30 and a second dataset, 40B is part of a second thread, 32. Each data set will startexecution on the rising edge of clock 1 and is presented to the ALU forexecution. The clock rate of C1 is double the clock rate for thehardware to complete execution of the data. The hardware on which thethreads 30 and 32 will be executed is similar to the hardware of FIG.2A, with minor changes described later herein. The input to the ALU isshifted by half a clock cycle for thread 30 and thread 32. As shown inFIG. 3A, on clock C1, the first thread 30 is introduced to the executionstage; while it is being executed, the second thread 32 is introduced tostart execution. While the first data set is being executed within theALU, the clock C1 for the second thread rises, starting execution of thesecond thread, 32.

As shown in FIGS. 3A and 3B, the present invention provides for a firstthread 30, labeled Thread A and a second thread 32 labeled Thread B tobe alternatively executed within the same logic unit. The instructionsare threaded inbetween each other with the feedback path connected toensure that the feedback from the first thread affects only data fromthe first thread and feedback from the second thread affects only datafrom the second thread.

The execution of the alternate threaded data stream can be seen aspipeline 34, which shows the threads intertwined. An instruction fromThread A is alternatively executed with every other instruction fromThread B on subsequent clock events. In a preferred embodiment, oneinstruction from each thread is executed per clock cycle so that twoinstructions are executed per clock cycle. This results in doubling theexecution speed of the data path for a given clock cycle. Thus, if theexecution of the data were previously at 300 MHz by doing thealternating multi-thread architecture of the present invention, theexecution is at 600 MHz. In one embodiment, the clock speeds are doubledso that execution of each thread alone is carried out at the same speedas before, but since the threads are alternated with each other and eachruns at the same speed as one thread alone, both threads are executed atthe same rate as one thread of the prior art, thus effectively doublingthe execution of the data.

The first clock event is the rising edge of C1 that triggers theexecution of a step in Thread A. The rising edge of C1 again, which isnow at double the speed, triggers the execution of the next step orinstruction from Thread B. The rising edge of the next clock pulse, C2,triggers the execution of the next data or instruction from Thread A.

Within the present invention, the content of Thread A will be referredto as either an instruction, or sometimes as data. The performing ofsome function with the data is referred to as the execution of the data.The phrases “instruction” and “data” are to be interpreted broadly so asto include any informational signal traveling through a path. Forexample, in some cases, the data may be an instruction, and thus beexecuted by performing the instruction in a core logic circuit. Also, insome cases, the instruction, may in fact be a type of data. The data maybe an address or, alternatively a value parameter, whether numeric,alphabetic, or some other value. Thus, the term “data” is intended to beused in its broadest sense to include all types of data signals whichmay be stored, executed, or used as pointers, addresses or for otherpurposes in the digital signal processor. The two terms may be usedinterchangeable for certain operations and stages in the context of thepresent invention.

The execution of the data refers to the data being treated in itsintended manner by the logic circuit to which it is input. In theexample provided in FIG. 4, the logic circuit is an arithmetic logicunit, may be a multiplier, an adder, a digital signal processor or someother logic unit. Thus, the execution in the logic unit refers to thetreatment of the input data according to the rules of the particularlogic circuit to which it has been input. The use of the ALU is providedas one acceptable example but other types of logic circuit 16 may beused and are considered equivalent to that of the ALU shown with respectto the present invention.

As shown in FIG. 3B, Thread A 30, standing alone is organized as knownin the prior art, while Thread B 32, standing alone is also organized asknown in the prior art. The combining of the two creates in analternative threaded pipeline 34 within the present invention.

Considering both the schematic block of FIG. 4 and the threads of FIG.3B, on a single clock cycle two instructions are executed, a firstinstruction from Thread A and a second instruction from Thread B. On asubsequent clock cycle two more instructions are executed, one from eachof Thread A and Thread B, alternating with each other. The execution ofthe alternative threads of the pipeline continues as shown in FIG. 3.The pipeline 34 with eighteen stages of data being executed in the sametime which previously executed nine stages of pipeline.

The execution of the stages in the alternate threaded pipeline 34 usesbasically the same hardware and the same software as previouslyexisting, with some changes to take advantage of the time multiplexingand multi-threading. Within Thread A or B, the examples of the databeing executed may include such items as data 40, IF1, instruction fetchcycle 1; data 42, IF2, instruction fetch cycle 2; data 44, ID1,instruction decode cycle 1; data 46, ID2, instruction decode cycle 2;the fifth data 48, EA being effective address calculation. The data MEM50, being the sixth data, MEM, memory access. The seventh data 52 beingEX, execution cycle 1. The eighth data, WB1 being write back cyclenumber 1; and the ninth data 56 being write back number 2. The letter Abeing present behind each reference number in FIG. 3 indicates that thestage is part of Thread A, while a B, behind the number that they are inThread B. Thus, Thread A is composed of standard data instruction sets40A, 42A, 44A, 46A, 48A, 50A, 52A, 54A and 56A as would exist in aconventional well-known pipeline.

According to the prior art, as previously discussed with respect to FIG.1 and FIG. 2A, each of these data and/or instructions are executed on asingle clock cycle, a first clock being used for the first part of theexecution of the data and the second clock being used for the latchingand/or the second execution of the data. Thus, shown in FIG. 2A, of theprior art, one entire clock cycle is required to perform the executioncycle 1 from the pipeline of the prior art. Two clock events, C1 and C2,constituting a full clock cycle are used to complete the execution ofinstruction 52. A single clock cycle lasting 2.5 nanoseconds and half ofthe clock cycle being 1.25 nanoseconds as shown in FIG. 2A.

According to the present invention, during the same time period of thesingle clock cycle, two instructions are executed, one in each clockevent, there being two clock events per clock cycle. Thus, on the firstevent of the clock cycle, in one example the rising pulse of C1, theInstruction Fetch cycle 1 from Thread A, 40A is introduced to the logicunit 16 for execution. On a subsequent clock event, such as the nextrising edge of the same clock cycle, the next instruction is from ThreadB, in this example Instruction Fetch Cycle 1, 40B is introduced forexecution in the arithmetic logic unit 16. The data and the instructionssets from Threads A and B are alternatingly executed on each clock eventgiving the effective results of an eighteen stage pipeline from a ninestage thread.

FIG. 4 illustrates the circuit for carrying out the present invention.The logic as used in the prior art is modified slightly in order tocarry out the alternating multi-thread pipeline of threads A and B. Alogic circuit 16 is provided for execution of the input data S0 and S1,as in the prior art, but with a significant difference in the threads,as will now be explained. A first input circuit 60 is coupled to thelogic circuit 16 to carry input signal S0 on line 64. A second inputcircuit 62 is provided to carry input signal S1 on line 67. A shadowregister 61 is coupled to the input circuit 60, while a shadow register63 is coupled to input circuit 62. The shadow registers 61 and 63provide important advantages for moving the threads through the pipelinewhen there is a stall, a feature not possible in the prior art. Each ofthe input circuits 60 and 62 receives a clock event via clocks signals.Presented to input circuit 60 is a signal line 64 that will carry eachof the threads to be alternatively clocked into the logic circuit. Afirst signal line 64 provides an input for Thread A during a first timeperiod. In a preferred embodiment, the same line 64 has presented to itan input for Thread B on a next clock event. Thus, both Thread A andThread B are provided at the input to the input circuit 60 on line 64,time multiplexed. The threads are clocked into the input circuit 16 forexecution in the logic element, in this example, for execution in anALU. In an alternative embodiment, a second input line to circuits 60and 62 is provided and the time multiplexing of the input lines to theinput circuits need not be carried out.

The second input circuit 62 has an input line 67 that has input providedto it. The input line 67 has time multiplexed onto it the data from S1that will be acted on in logic circuit 16 with the input from S0 thathas alternatively Thread A and Thread B, as described with respect toline 64.

Input circuits and their 60 and 62 will be described herein in moredetail. On the first clock event, the input circuits 60 and 62 areclocked so that the data signal at the input is provided at the output.For example, the data on thread A is latched at the ALU source. On thenext clock event, Thread A is executed in the ALU 16 and Thread B islatched at the ALU source. On the next clock event, Thread B is executedand Thread A is latched at the ALU source. This repeats and continues,with the simultaneous execution and latching of respective threads A andB, so that Alternate Multi-Thread operation is achieved. As can be seen,the appropriate thread, whether Thread A or Thread B, is output from theclocked input circuits depending on the portion of the cycle. The properselection of one of the threads can be achieved by any number ofacceptable methods. For example, the clock input circuits 60 and 62 inone a embodiment are a multiplexed input circuits. In a multiplexedversion of circuit 60 a time multiplexed signal line is provided, whichpresents the appropriate Thread, Thread A or B to be latched and passedthrough to the output, such circuits per se being well known. In anotherembodiment the input circuit 60 is sensitive to the type of clock signalbeing presented for the transferring of data from the input to theoutput. On a rising pulse, the clock circuit 60 is structured to provideat its output the signal of Thread A and to block from being output thedata at the terminal for Thread B. Similarly, on rising edge of the nextclock signal, C2, the clock circuit is structured to output the signalpresent on signal line for Thread B at its output and block the outputof signal line from Thread A. Further, in each of the clock cycles, theinformation on the feedback loop 68, if present, is also clocked intothe logic circuit 16.

The logic circuit 16 is an automatic execution circuit which is notclocked in the present embodiment, but which takes a selected time tocomplete the execution. Namely, as soon as data is presented at theinputs, the data is executed and provided at the output based on thespeed that the hardware can execute the data. The arithmetic logic unit16 is therefore able to operate at a high rate of speed which isselected to be more rapid than one-half of a clock cycle. After thefirst clock event has occurred, the data will be executed inside thelogic unit 16 and the output provided at the input to multiplexingdriver circuit 70. On the subsequent clock event, such as the rising (orin some cases, the falling) edge of the clock pulse which is present atthe input of multiplex and drive circuits 70 will be driven through tothe output from node F. Thus, the present invention takes advantage ofthe fact that unclocked logic units are able to process data or executeinstructions to be provided for an input to the next cycle during thetransition between subsequent clock events, such as the rising edge andfalling edge of a clock cycle. Thus, the arithmetic logic unit is ableto execute the data and have the output present prior to the second halfof the clock cycle occurring so that the output from Thread A has beenprocessed and circuit is ready to receive new data from Thread B at itsinput during the second half of the same clock cycle.

Many times, a thread will stall in execution during the pipeline.Pipeline stalls are frequent in the prior art and occur on events thatare difficult to predict. For example, the data needed for the next stepin the thread may not be ready from another part of the circuit, or anexecute from another part of the hardware is not completed slightlyslower than standard so its output is not present for a given thread toproceed. When a pipeline stall occurs, the thread stops. This was commonin the prior art and the entire pipeline must stop until the stallclears. The present invention is effective to avoid overcome theproblems caused by pipeline stalls. If a stall occurs in one thread, thethread is shifted into shadow register 61 and 63. For example, if thereis a stall in pipeline A, then the data in the next step of pipeline Ais moved into the shadow register of the respective clock, whether 61,or 73. Thread B is executed on the next clock cycle and continues tomove through the pipeline stages. Thread B can continue to move withoutconcern for the stall in pipeline A. Thus, many cycles of Thread B mayexecute with circuit waits for the stall in pipeline A to clear. Whenthe stall clears, then on the next clock cycle, Thread A is moved fromthe respective shadow registers back into the pipeline stages forexecution alternating with Thread B. The stopping of a single threadduring a pipeline stall and the holding and restating of a thread arewell known in the art, so the details are not shown. Those of skill inthe art of very familiar with such stalls and the circuit connects andtiming to handle them until they stall is cleared, and the sametechniques as used in the prior art to handle a stall and a restart ofone thread can be used for either thread A or B of the presentinvention.

The important advantage of the present invention is that a stall in onethread does not slow the execution of entire system and stop all threadsthat are moving in the system. The other thread which is being executedon the same hardware can continue. Thus, instead of a pause in all dataexecution for one or several clock cycles during a stall, during whichthe ALU and other hardware is idle, the other thread continues to movethrough the pipeline. Data is executed at the standard rate. Once thestall is cleared, both threads are once again executed in an alternatingfashion as before, providing double the execution of data. A multiplexand drive circuit 70 is coupled to the output of the logic circuit 16.This circuit provides and holds the data in a feedback node F. Themultiplexer will select for feedback the appropriate thread, A or B,depending on which thread is being presented to the clock circuits 60and 62 so that the two threads do not intermix and remain completelyindependent of each other, even though they are using the same ALU andclocking circuits. A feedback line 68 is coupled from the feedback nodeF to the input of clock input circuit 60 so that executed data may beprovided back to the logic circuit in the correct thread sequence forthe next subsequent data or instruction within the same thread.Specifically, the selection of the clock cycles and the location of thefeedback loop 68 is selected to ensure that data instructions fromThread A are ensured of being fed back to only Thread A, and that datainstructions from Thread B are ensured of being fed back only to ThreadB.

If the logic circuit 16 is an adder frequently one or more carry bitswill be required to be fed back to the input. Similarly, DSP circuitshave carry bits or instruction flags whose output is determined by theexecution which occurs within the logic circuit 16. Provision is madefor these to be fed back on feedback path 68 or fed to other circuits ifsuch are present. Of course, some logic circuits will not require aportion of the data and the instruction to be fed back, in which eventthe line 68 will be a null data set and will not appear as the feedbacksignal and therefore its contribution at input circuit 60 will have noeffect on execution within the logic circuit 16.

The method by which data is transitioned through the circuit of FIG. 4is shown in FIG. 5 to represent the data present at the various nodes asmarked in FIG. 4. Nodes 11 and 12 represent the input nodes to the logiccircuit 16. These nodes are the transition nodes which are the output ofthe first and second input circuits 60 and 62 and are provided as thedirect inputs to the logic circuit 16. Thus, data present at nodes 11and 12 will be executed immediately without further clocking.

The feedback node F between the multiplex and driver circuit 70 and theclock output driver 72. It may also be considered an output node sincethe data is the same at the output node and an output driver circuit 72is provided which provides the driven output data which may or may notbe inverted from the feedback node F. The output node 0 represents thefinal combined output data. The clock pulse may be considered to havingvarious clock events occurring begin at time to a first event is at timet₁, second event at time t₂, and third event at time t₃ and so forth. Inone embodiment, each of the clock events is represented by a transitionin the edge of the clock pulse. For example, time event t₁ is the risingedge of the clock pulse and event t₂ is the falling edge of same clockpulse and the rising edge of the other clock, C2. Other clock eventscould also be considered the equivalent and substituted in place of therising and falling edges of the clock pulses. At time t₁ the descriptionof the operation of the data as shown in FIG. 5 as operating in thecircuit of FIG. 4 will now be described in detail with respect to thetiming diagram. At a first clock event t₁ the Thread A data is latchedinto the logic circuit 16 as an input. This means that the data which ispresent on signal line Thread A at the input to the clock circuit 6 and62 is transitioned to nodes 11 and 12 as indicated in FIG. 5. Thread Asignals S0 and S01 are therefore present at the input node of logiccircuit 16. The latched data enters the input nodes t₁ and t₂ on therising edge of the clock pulse at event t₁ and remained present duringthe period between t₁ and t₂. While they are present at the input node,the logic circuit 16 executes the data and provides it at its output.The data on Thread B is present at this time on the inputs of 60 and 62and is ready for the next latch cycle. At time t₂ on the falling edge ofthe same clock pulse, the data is being executed in the ALU and movedforward. Keep in mind that clocks C1 and C2 are now at double the priorfrequency. As the clock C1 rises again, t₃ Thread B data is latched intothe logic circuit 16 source. Simultaneously, Thread A data which hasbeen executed, which has just completed execution in the ALU is latchedby the multiplexing drive circuit 70 to the feedback node F. Thus, ascan be seen in FIG. 5, the executed instruction, represented by thesymbol A_(S01) enters node F shortly after time t₂ being triggered onthe clock event t₂. With the latch data present feedback node F, andprovided to the feedback input terminal to the input circuit 60. Thus,if executed data is of the type for which a feedback signal is required,such feedback signal will be provided on feedback line 68. It willtherefore be available and waiting at the input of clock circuit 60while the second set of instructions in each of Threads A and B areprovided to the input nodes of clock circuit 60 and 62. The next dataand/or instruction set of Thread A is presented to the input of clocks60 and 62, together with any feedback on line 68. On the next clockevent, which is the rising edge of the subsequent clock pulse time t₅the data of Thread A is latched into the logic circuit 16 source forexecution. The prior data set of Thread B has just completed executioninside the logic circuit and is latched out to node F as indicated inFIG. 5. Further, the final data from the first Thread A is latched outof the output driver circuit 72 and is provided output node 0. On thesubsequent clock cycles, the pattern repeats with Thread B and Thread A,the subsequent data signals being latched forward into their respectivenodes at each clock transition point. Thus, new data is provided at eachclock transition point on the output node. The data is provided at therate of two executed data bits compared to the prior art clock cyclerather than one executed data thread per cycle. Thus, the data is outputat double the prior rate and the effective computation power of thelogic circuit has been doubled while keeping the power consumptionapproximately the same. The pipeline depth has been effectively doubledwhile maintaining the same pipeline branch rules and architecture. Thepresent invention thus provides little to know software impact on theoverall system. The same assembler and link of codes can be used. Thesame DSP codes for voice and modem as well as the CODEC can also beused. Some minor changes are required in the task arrangement to ensurethat the tasks are being executed simultaneously are properly organized.However, the protocol stack remains the same.

The present invention provides the substantial advantages over the priorart. The present multi-threaded scheme using two threads is able toachieve twice the execution speeds using substantially the same hardwareand exactly the same software. A deep pipeline is achieved withoutpipeline penalties. Namely, an effective 18 stage pipeline is availableusing only 9 stages of pipeline for each thread. A substantial advantageis that the software remains unchanged for substantial portions of thecircuit. The same instruction said and register structure can be used asin the standard microprocessor. The same pipeline stall and pipelinebranch rules are applied from the standard pipeline architecture. Thesame optimization code can be used. Thus, substantial software changeswill not be required. Instead, two threads or what may be considered twochannels or run simultaneously thus providing twice the performance.Some slight modifications to the clock input register 16 and 62 as wellas to other portions of the circuit, such as the feedback circuit 72 areall that is necessary in order to achieve the alternativemulti-threading of the present invention, such as the multiplexer andshadow registers of FIG. 4. Adding the additional circuits at numerousplaces in the chip results in the slight increase in overall chip size,for example 20 and 30 percent minimum geometries. Much of the controllogic can be resused. Some latches will be added or modified, as well ascircuit optimization. A substantial advantage is that the increase inpower consumption is slight. It is estimated that the power consumptionwill be approximately 20%-30% greater than that used in the standardthreaded or hyper thread architecture. The twice the instructionexecution rate is achieved with only a modest increase in core powerconsumption. The increase in power consumption is based on theadditional control logic and latches of which only modest increases areneeded in order to achieve the double throughput based on principles ofthe present invention. A substantial advantage is obtained in SPUperformance. Two tasks can run simultaneously. The alternative threadedarchitecture thus substantially speeding up overall circuit performancewell beyond what would otherwise be permitted.

All of the above U.S. patents, U.S. patent application publications,U.S. patent applications, foreign patents, foreign patent applicationsand non-patent publications referred to in this specification and/orlisted in the Application Data Sheet, are incorporated herein byreference, in their entirety.

From the foregoing it will be appreciated that, although specificembodiments of the invention have been described herein for purposes ofillustration, various modifications may be made without deviating fromthe spirit and scope of the invention. Accordingly, the invention is notlimited except as by the appended claims.

1. A method of pipelining data comprising: inputting to a logic circuita first data set of a first thread on a rising edge of a first clockpulse; inputting to the logic circuit a first data set of a secondthread on a falling edge of the first clock pulse; executing in thelogic circuit the first data set of the first thread during the timebetween the rising and falling edges of the first clock pulse; movingthe executed first data set signal of the first thread to a feedbacknode on the falling edge of the first clock pulse; inputting to thelogic circuit a second data set from the first thread, together with thefeed back data from the first data set signal of the first thread on arising edge of the second, subsequent clock pulse; executing in thelogic circuit the first data set of the second thread during the timebetween the falling and rising edges of the first and second clockpulses; moving the executed first data set signal of the second threadto a feedback node on the rising edge of the second clock pulse; andinputting to the logic circuit a second data set from the second thread,together with the feed back data from the first data set signal of thesecond thread on a falling edge of the second, subsequent clock pulse;outputting a completed first data set of the first thread to an outputnode on the rising edge of the second clock pulse.
 2. The methodaccording to claim 1 wherein the execution of data sets from the firstand second threads alternates on the respective rising and falling edgesof clock pulses.
 3. The method according to claim 1 wherein the any feedback data from first thread is presented to be input with only withsubsequent data from the first thread and any feed back data from thesecond thread is presented to be input only with subsequent data fromthe second thread.
 4. The method according to claim 1, wherein the logiccircuit includes a first and a second input, the first input of thelogic circuit being coupled to an output of a first input circuit, thesecond input of the logic circuit being coupled to an output of a secondinput circuit.
 5. The method according to claim 4, wherein a firstthread signal line is coupled to the first input circuit for beingselectively input to the logic circuit.
 6. The method according to claim4, wherein a second thread signal line is coupled to the second inputcircuit for being selectively input to the logic circuit.
 7. The methodaccording to claim 4, wherein a control circuit is coupled to the firstand second input circuits for alternatively passing a first threadsignal or a second thread signal through the first and second inputcircuits to the logic circuit for signals from first thread to beexecuted by the logic signal simultaneously with each other and upon asubsequent clock event, signals from the second thread to be executed bythe logic circuit simultaneously with each other.